﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="publishers.aspx.vb" Inherits="prueba.WebForm6" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="table1" style="width:100%;">
    <tr>
        <td>
            <asp:GridView ID="GridView1" runat="server" 
                DataSourceID="publishersSqlDataSource1" AutoGenerateColumns="False" 
                DataKeyNames="pub_id">
                <Columns>
                    <asp:BoundField DataField="pub_id" HeaderText="pub_id" ReadOnly="True" 
                        SortExpression="pub_id" />
                    <asp:BoundField DataField="pub_name" HeaderText="pub_name" 
                        SortExpression="pub_name" />
                    <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
                    <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
                    <asp:BoundField DataField="country" HeaderText="country" 
                        SortExpression="country" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="publishersSqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:pubsConnectionString14 %>" 
                DeleteCommand="DELETE FROM [publishers] WHERE [pub_id] = @pub_id" 
                InsertCommand="INSERT INTO [publishers] ([pub_id], [pub_name], [city], [state], [country]) VALUES (@pub_id, @pub_name, @city, @state, @country)" 
                SelectCommand="SELECT * FROM [publishers]" 
                UpdateCommand="UPDATE [publishers] SET [pub_name] = @pub_name, [city] = @city, [state] = @state, [country] = @country WHERE [pub_id] = @pub_id">
                <DeleteParameters>
                    <asp:Parameter Name="pub_id" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:ControlParameter ControlID="TxtBox1pub_id" Name="pub_id" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="TxtBox2pub_name" Name="pub_name" 
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="TxtBox3city" Name="city" PropertyName="Text" 
                        Type="String" />
                    <asp:ControlParameter ControlID="TxtBox4state" Name="state" PropertyName="Text" 
                        Type="String" />
                    <asp:ControlParameter ControlID="TxtBox5country" Name="country" 
                        PropertyName="Text" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="pub_name" Type="String" />
                    <asp:Parameter Name="city" Type="String" />
                    <asp:Parameter Name="state" Type="String" />
                    <asp:Parameter Name="country" Type="String" />
                    <asp:Parameter Name="pub_id" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
        </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label1" runat="server" Text="pub_id"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox1pub_id" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label2" runat="server" Text="pub_name"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox2pub_name" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label3" runat="server" Text="city"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox3city" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label4" runat="server" Text="state"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox4state" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Label ID="Label5" runat="server" Text="country"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox5country" runat="server"></asp:TextBox>
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
                    <asp:Button ID="Button1" runat="server" Text="Enviar" />
                    <asp:Button ID="Button2" runat="server" Text="BORRAR" style="height: 26px" />
                </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</asp:Content>
